
#ifndef YAMLFORMATER_H
#define YAMLFORMATER_H

#include <BDockLayout>
#include <BTreeWidget>
#include <BYamlNode>
#include <BTextFormat>

using namespace BWE;

class YamlFormat : public BTextFormat
{
public:
	YamlFormat(const BString& name = BString());
	~YamlFormat();

protected:
	BTreeItem* createTreeItem(BYamlNode* node);

protected:

protected:
	virtual void attached(BTextEdit* textEdit);
	virtual void detached(BTextEdit* textEdit);

	virtual void freshEvent(const BEvent& event);

private:
	BHolder<BDockLayout>	_dockLayout;
	BTreeWidget*			_treeWidget;
	bool					_dirty;

};

#endif
